package com.skeeey.aim.model;

public enum AutoStatus {
	UNKNOWN(-1, "未知"),
	ON_THE_WAY(0,"正常车在途"),
	IN_INVENTORY(1,"在库"),
	UNPICK_UP(2,"未提"),
	VIRTUAL(3,"虚拟");
	
	private int val;
	private String name;
	
	private AutoStatus(int val, String name) {
		this.val = val;
		this.name = name;
	}
	
	public int getVal() {
		return val;
	}
	
	public String getName() {
		return name;
	}
	
	public static AutoStatus getAutoStatusBy(String name) {
		AutoStatus status = UNKNOWN;
		for(AutoStatus as : AutoStatus.values()) {
			if(as.getName().equals(name)) {
				status = as;
				break;
			}
		}
		return status;
	}
}
